import jwt_decode from "jwt-decode";
import {secure} from '@/config'


export const getUserInfo = ()=>{
    const token = window.sessionStorage.getItem('token');
    if (!token) return false;
    // 解密   token,secure 
    let userinfo = jwt_decode(token,secure)   
    console.log(userinfo,'userinfo');
    return userinfo;
}
export const isLogin = ()=>{

    return !!getUserInfo();
}